using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;


namespace Planisoft.DAO.Mapping
{
    public class TipoContratoMap : EntityTypeConfiguration<TipoContrato>
    {
        public TipoContratoMap()
        {
            // Primary Key
            this.HasKey(t => t.IdTipoContrato);

            // Properties
            this.Property(t => t.CodPdtTipoCont)
                .HasMaxLength(10);

            this.Property(t => t.DesctipoCont)
                .IsRequired();

            // Table & Column Mappings
            this.ToTable("TipoContrato");
            this.Property(t => t.IdTipoContrato).HasColumnName("IdTipoContrato");
            this.Property(t => t.CodPdtTipoCont).HasColumnName("CodPdtTipoCont");
            this.Property(t => t.DesctipoCont).HasColumnName("DesctipoCont");
        }
    }
}
